package com.example.binjiangapp.controller;

import com.example.binjiangapp.DAO.satellite;
import com.example.binjiangapp.common.AjaxResult;
import com.example.binjiangapp.mapper.satelliteMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.binjiangapp.service.testService;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/data")
public class testController {
    @Resource
    satelliteMapper satelliteMapper;

    @Autowired
    testService testServicedome;
    /**
     * 测试与c++端的消息传输
     */
    @GetMapping("/testToC")
    public AjaxResult getTestToC(){
        // 订阅C端的发送，并进行相应的处理
        testServicedome.getTestResult();
        return AjaxResult.success("传输成功");
    }

    /**
     * @return三维数据
     */
    @GetMapping("/satellite")
    public List<satellite> getSatellite() {
        return satelliteMapper.getLatitudeList();
    }

    @GetMapping("/test")
    public String getUser() {
        return "allData";
    }

}
